package edu.towson.cosc.cosc455.aderito.compiler;

public class Compiler {

	public static String token;
	static MyLexicalAnalyzer lexer;
	static MySyntaxAnalyzer parser;
	static MySemanticAnalyzer generator;
	
	public static void main(String[] args){
		
		token = "";
		
		//Check that there is 1 arg
		if(args.length != 1){
			System.err.println("ERROR!");//make useful error. No file, more than one file attempted to be input
			System.exit(0);
		}
		
		//Check Extension
		//Initialize Parse Tree Array?
		//Other initializations?
		
		lexer = new MyLexicalAnalyzer();
		lexer.getNextToken();
		
		//Call into syntax analyzer
		parser = new MySyntaxAnalyzer();
		parser.lolcode();
		
		generator = new MySemanticAnalyzer();
		//Call Semantic Analyzer
		
		//Write output file
		//Clean up? Close files or delete/destroy objects
		
	}
}
